<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title></title>

    <!-- caat -------------->
    <script type="text/javascript" src="../../../src/CAAT.js"></script>

    <script type="text/javascript" src="../../../src/core/class.js"></script>
    <script type="text/javascript" src="../../../src/core/browserdetect.js"></script>

    <script type="text/javascript" src="../../../src/model/actor.js"></script>
    <script type="text/javascript" src="../../../src/model/conpoundimage.js"></script>
    <script type="text/javascript" src="../../../src/model/imagepreloader.js"></script>
    <script type="text/javascript" src="../../../src/model/director.js"></script>
    <script type="text/javascript" src="../../../src/model/mouseevent.js"></script>
    <script type="text/javascript" src="../../../src/model/scene.js"></script>

    <script type="text/javascript" src="../../../src/math/affinetransform2D.js"></script>
    <script type="text/javascript" src="../../../src/math/point.js"></script>
    <script type="text/javascript" src="../../../src/math/rectangle.js"></script>
    <script type="text/javascript" src="../../../src/math/bezier.js"></script>

    <script type="text/javascript" src="../../../src/path/path.js"></script>
    <script type="text/javascript" src="../../../src/path/pathactor.js"></script>
    <script type="text/javascript" src="../../../src/path/interpolator.js"></script>
    <script type="text/javascript" src="../../../src/path/interpolatoractor.js"></script>

    <script type="text/javascript" src="../../../src/behaviour/behaviour.js"></script>


    <!-- bubbles -------------->
    <script type="text/javascript" src="game/namespace.js"></script>
    <script type="text/javascript" src="game/context.js"></script>
    <script type="text/javascript" src="actor/gamescene.js"></script>



    <script type="text/javascript">

        function __Bubbles_init()   {

            var canvascontainer= document.createElement('div');
            var director = new CAAT.Director().initialize(680,500);
            canvascontainer.appendChild( director.canvas );
            document.body.appendChild(canvascontainer);

            new CAAT.ImagePreloader().loadImages(
                [
                    {id:'fish',     url:'res/img/anim1.png'},
                    {id:'fish2',    url:'res/img/anim2.png'},
                    {id:'fish3',    url:'res/img/anim3.png'},
                    {id:'fish4',    url:'res/img/anim4.png'},
                    {id:'buble1',   url:'res/img/burbu1.png'},
                    {id:'buble2',   url:'res/img/burbu2.png'},
                    {id:'buble3',   url:'res/img/burbu3.png'},
                    {id:'buble4',   url:'res/img/burbu4.png'},
                    {id:'plants',   url:'res/img/plants.jpg'}
                ],

                function( counter, images ) {
                    if ( counter==images.length ) {
                        director.imagesCache= images;

                        var gameContext= new BUBBLES.Context();
                        gameContext.create( 10, 15, 6 );

                        var gameScene= new BUBBLES.GameScene();
                        gameScene.create(director);

                        director.addScene( gameScene.directorScene );
                        director.setScene( 0 );

                        director.loop(60);
                       
                    }
                }
            );
        }

        window.addEventListener('load', __Bubbles_init, false);
    </script>
</head>
<body>

</body>
</html>